package com.zjzywl.smoke.task;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.zjzywl.smoke.manager.AlarmManager;


@Component
public class TaskManager {
	@Autowired
	private DeviceOfflineInspection runnable;
	
	@Autowired
	private AlarmManager alarmManager;
	
	
	public void startTask() {
		 alarmManager.loadAlarm();
		
		
	    Thread thread = new Thread(runnable);
	    thread.start();	
	}
	

	public void stopTask() {
		DeviceOfflineInspection.stop = true;
	}    	
}
